<?php

	include_once 'parsePersist.php';

	$filename = "collect.txt";
	$file = fopen($filename,"a+");
	
	$raw_data = $GLOBALS[HTTP_RAW_POST_DATA];
	if(empty($raw_data)) {
		$raw_data = file_get_contents('php://input');
	}
	
	$xml = bzdecompress($raw_data);
	
	$parse = new Parser($xml);
	$parse->analysis();
	$parse->__destruct();
		
	fwrite($file,$xml);
	fclose($file);
	
?>
